package org.itboys.mobile.entity.mysql.wallet;

import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zhangyang on 2017/12/19.
 * 圣代_钱包_变动记录_实体类
 */
public class SundayWalletRecord extends BaseMySqlEntity {

	//基础属性
	private Long memberId;//用户ID

    private Long walletId;//钱包ID


    //变动的类型:
    // 账户余额(1-充值,2-提成,3-购物使用,4-提现),
    //积分(5-积分兑换,6-购物获得,7-登录获得,8-评论获得,9-分享获得),
    //爱购币(10-抵扣,11-购物获得,12-分享商品获得,13-展示到社区获得,14-评论获得)
    private Integer type;
    private String remark;//备注
    private BigDecimal amount;//记录金额/分数/爱购币数量
    private BigDecimal ableAmount;//当前可用金额/分数/爱购币数量
    private String orderNo;//订单号
    private Integer status;//状态。1生效（支付回掉后），0无效（支付前），

    //提现相关属性
    private Integer accountStatus;//提现状态:1-已申请,2已通过,3-已驳回
    private String accountOpenId;//微信openId；
    private String accountRealName;//微信认证的真实姓名;
    private String accountNo;//内部付款流水号，用户重复调用微信企业付款
    private String accountPayNo;//微信付款编号
    private String accountPayTime;//微信付款时间
    private Integer accountType;//提现类型。2微信开放平台，3微信公众号（针对app）


    public SundayWalletRecord() {
    }

    public SundayWalletRecord(Long memberId, Long walletId, Integer type, String remark, BigDecimal amount, String orderNo, Integer status) {
        this.memberId = memberId;
        this.walletId = walletId;
        this.type = type;
        this.remark = remark;
        this.amount = amount;
        this.orderNo = orderNo;
        this.status = status;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getWalletId() {
        return walletId;
    }

    public void setWalletId(Long walletId) {
        this.walletId = walletId;
    }



    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAbleAmount() {
        return ableAmount;
    }

    public void setAbleAmount(BigDecimal ableAmount) {
        this.ableAmount = ableAmount;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(Integer accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getAccountOpenId() {
        return accountOpenId;
    }

    public void setAccountOpenId(String accountOpenId) {
        this.accountOpenId = accountOpenId;
    }

    public String getAccountRealName() {
        return accountRealName;
    }

    public void setAccountRealName(String accountRealName) {
        this.accountRealName = accountRealName;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public String getAccountPayNo() {
        return accountPayNo;
    }

    public void setAccountPayNo(String accountPayNo) {
        this.accountPayNo = accountPayNo;
    }

    public String getAccountPayTime() {
        return accountPayTime;
    }

    public void setAccountPayTime(String accountPayTime) {
        this.accountPayTime = accountPayTime;
    }

    public Integer getAccountType() {
        return accountType;
    }

    public void setAccountType(Integer accountType) {
        this.accountType = accountType;
    }
    public String getAccountStatusStr(){
        String accountStatusStr= "";
        if(accountStatus==null)return accountStatusStr;

        switch (accountStatus) {
            case 1:
                accountStatusStr="待审核";
                break;
            case 2:
                accountStatusStr="已通过";
                break;
            case 3:
                accountStatusStr="已驳回";
                break;
            default:
                break;
        }
        return accountStatusStr;
    }
}
